{% extends "admin/base.html" %}

{% block admin_content %}
<div class="row">
    <div class="col-md-12">
        <div class="alert alert-warning">
            <strong>Admin Access:</strong> This is a demonstration of admin functionality. 
            In a real application, this section would require authentication.
        </div>
    </div>
</div>

<div class="row">
    <div class="col-md-8">
        <h3>Admin Dashboard</h3>
        
        <div class="row">
            <div class="col-md-4">
                <div class="card text-white bg-primary mb-3">
                    <div class="card-header">Users</div>
                    <div class="card-body">
                        <h5 class="card-title">12</h5>
                        <p class="card-text">Registered users</p>
                    </div>
                </div>
            </div>
            
            <div class="col-md-4">
                <div class="card text-white bg-success mb-3">
                    <div class="card-header">Posts</div>
                    <div class="card-body">
                        <h5 class="card-title">24</h5>
                        <p class="card-text">Published posts</p>
                    </div>
                </div>
            </div>
            
            <div class="col-md-4">
                <div class="card text-white bg-info mb-3">
                    <div class="card-header">Comments</div>
                    <div class="card-body">
                        <h5 class="card-title">42</h5>
                        <p class="card-text">User comments</p>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="card">
            <div class="card-header">
                <h5>Recent Activity</h5>
            </div>
            <div class="card-body">
                <ul class="list-group">
                    <li class="list-group-item">
                        <strong>John Doe</strong> created a new post <em>"Understanding Flask Blueprints"</em>
                        <span class="float-end text-muted">2 hours ago</span>
                    </li>
                    <li class="list-group-item">
                        <strong>Jane Smith</strong> commented on <em>"Getting Started with Flask"</em>
                        <span class="float-end text-muted">5 hours ago</span>
                    </li>
                    <li class="list-group-item">
                        <strong>Admin</strong> updated site settings
                        <span class="float-end text-muted">1 day ago</span>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    
    <div class="col-md-4">
        <div class="card">
            <div class="card-header">
                <h5>Quick Actions</h5>
            </div>
            <div class="card-body">
                <a href="{{ url_for('admin.users') }}" class="btn btn-primary w-100 mb-2">Manage Users</a>
                <a href="{{ url_for('admin.posts') }}" class="btn btn-primary w-100 mb-2">Manage Posts</a>
                <a href="{{ url_for('admin.settings') }}" class="btn btn-secondary w-100 mb-2">Site Settings</a>
                <a href="{{ url_for('blog.create') }}" class="btn btn-success w-100">Create Post</a>
            </div>
        </div>
        
        <div class="card mt-3">
            <div class="card-header">
                <h5>System Status</h5>
            </div>
            <div class="card-body">
                <p><strong>Server:</strong> <span class="badge bg-success">Online</span></p>
                <p><strong>Database:</strong> <span class="badge bg-success">Connected</span></p>
                <p><strong>Last Backup:</strong> Today, 02:00 AM</p>
            </div>
        </div>
    </div>
</div>
{% endblock %}